<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="cms" uri="http://cms.gxsoft.com/tags-cms"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用人单位信息管理--增加</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	function selectEmployer(){
		var arr = showModalDialog("<%=request.getContextPath()%>/EmployerInfo.do?method=find", "", "dialogWidth:550pt;dialogHeight:400pt;help:0;status:0");
		if(arr != null){
			var id = arr[0][0];
			var name = arr[0][1];
			document.form1.backPayUnitId.value = id;
			document.form1.unit.value = name;
		}
	}
	function check(){
		var frm = document.form1;
		if(frm.backPayUnitId.value == ""){
			alert("请选择欠薪单位！");
			return false;
		}
		if(frm.backPayPensonNum.value == ""){
			alert("请输入欠薪人数！");
			frm.backPayPensonNum.focus();
			return false;
		}
		if(isNaN(frm.backPayPensonNum.value )){
			alert("欠薪人数应为数字！");
			frm.backPayPensonNum.focus();
			return false;
		}
		if(frm.backPayMoney.value == ""){
			alert("请输入欠薪金额！");
			frm.backPayMoney.focus();
			return false;
		}
		if(isNaN(frm.backPayMoney.value )){
			alert("欠薪金额应为数字！");
			frm.backPayMoney.focus();
			return false;
		}
	}
</script>

</head>

<body>
<form name="form1" action="<%=request.getContextPath()%>/BackPay.do?method=add" method="post" onsubmit="return check()">
<table width="70%">
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;欠薪单位：</p>
    </td>
    <td width="75%" align="left" ><input type="hidden" name="backPayUnitId"><input type="text" name="unit" size="30" readonly onclick="javascript:selectEmployer()"> <input class="buttonadd" type="button" value="选择" onclick="javascript:selectEmployer()">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue"align="right">欠薪月份：</td>
    <td align="left">
    <select name="year">
    <c:forEach var="x" begin="1990" end="${endYear}" step="1">
    <option value="${x}" <c:if test="${x == endYear }">selected</c:if> >${x}</option>
    </c:forEach>
    </select>&nbsp;年
    <select name="month">
    <c:forEach var="x" begin="1" end="12" step="1">
    <option value="${x}">${x}</option>
    </c:forEach>
    </select>&nbsp;月
    </td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;欠薪人数：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="backPayPensonNum" maxlength="10">&nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;欠薪金额：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="backPayMoney" maxlength="50">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue"align="right">说明：</td>
    <td align="left"><textarea name="backPayRemark" cols="50" rows="10"></textarea></td>
  </tr>
  <tr>
    <td class="nohover" colspan="2" align="center"><input class="buttonsubmit" type="submit" value="提交">&nbsp;<input class="buttonreset" type="reset" value="重置"> <input class="buttonreturn" type="button" value="返回" onClick="history.go(-1)"></td>
  </tr>
</table>
</form>
</body>
</html>
